package com.tanhua.sso.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: JinboYang
 * @Description:
 * @Date: Created in 下午 19:59 2021/1/14
 * @ModifiedBy:
 */
@RestController
@RequestMapping("users")
public class UsersController {
    @Autowired
    private UserInfoController userInfoController;

    /**
       * @Description: 上传头像
       * @Param:[file, token]
       * @return:org.springframework.http.ResponseEntity<java.lang.Object>
       * @Author:JinboYang
       * @Date:2021/1/14
       */
    @PostMapping("header")
    public ResponseEntity<Object> saveLogo(@RequestParam("headPhoto") MultipartFile file, @RequestHeader("Authorization") String token) {
        return this.userInfoController.saveUserLogo(file, token);
    }

}
